package com.example.rlw.mvpplugintest.drawer;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.NavigationView;
import android.view.MenuItem;

import com.example.rlw.mvpplugintest.R;
import com.example.rlw.mvpplugintest.mvp.MVPBaseActivity;
import com.example.rlw.mvpplugintest.utils.AtomsUtils;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 描述：侧滑菜单和导航
 * Created by rlw on 2019/3/8.
 */
public class DrawerLayoutNavigationActivity extends MVPBaseActivity implements NavigationView.OnNavigationItemSelectedListener {
    @BindView(R.id.design_navigation_view)
    NavigationView mDesignNavigationView;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_drawer_navigation_layout;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData(@Nullable Bundle savedInstanceState) {
        mDesignNavigationView.setNavigationItemSelectedListener(this);
    }

    @Override
    protected void initNet() {

    }

    @Override
    public boolean onNavigationItemSelected(@NonNull MenuItem item) {
        switch (item.getItemId()) {
            case R.id.item1:
                AtomsUtils.makeText(this, "菜单1");
                break;
            case R.id.item2:
                AtomsUtils.makeText(this, "菜单2");
                break;
            case R.id.item3:
                AtomsUtils.makeText(this, "菜单3");
                break;
            case R.id.item4:
                AtomsUtils.makeText(this, "菜单4");
                break;
        }
        return true;
    }
}
